function IR = cartesianas1(I)
  [F C] = size(I);
img = zeros(F, C);
 Om = (F+1)/2;                  % co-ordinates of the center of the image
 On = (C+1)/2;
 sx = (F-1)/2;                  % scale factors
 sy = (C-1)/2;
 delR = 1/(F-1);
 delT = 2*pi/C;
 
for xi = 1:F
for yi = 1:C
    x = (xi - Om)/sx;
    y = (yi - On)/sy;
    
    
    
    radio = sqrt(x^2 + y^2);
    if radio >=0 && radio <=1
       theta = atan2(y,x);
       if theta < 0
           theta = theta + 2*pi;
       end
       ri = 1 + (radio)/delR;
       ti = 1 + theta/delT;
       rf = floor(ri);
       rc = ceil(ri);
       tf = floor(ti);
       tc = ceil(ti); 
       if tc > F
          tc = tf;
       end
       if rc > C
          rc = tf;
       end
       
       if(radio>0.3 && radio<0.7)
         if (rf == rc && tc == tf)
            img(rc,tc)=1;
         elseif (rf == rc)
            img(rf,tf)=1; 
         elseif (tf == tc)
            img(rf,tf)=1;
         else
            img(rc,tc)=1;
         end
        
        img(rc,tc)=1;
        img(rf,tf)=1;
       end
    end
end
end


IR=img;
end